package com.yuanchu.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.common.utils.PageResult;
import com.yuanchu.order.dto.GoodsRefundParamsDto;
import com.yuanchu.order.dto.OrderRefundParamsDto;
import com.yuanchu.order.entity.YoshopOrderRefundEntity;

/**
 * 售后单记录表
 *
 * @author adan
 * @email 2028038953@gmail.com
 * @date 2023-12-19 20:57:21
 */
public interface YoshopOrderRefundService extends IService<YoshopOrderRefundEntity> {

    /**
     * 查询售后订单数量
     * @return
     */
    long queryRefundOrder();

    /**
     * 查询售后订单列表
     * @param state
     * @param page
     * @param userId
     * @return
     */
    PageResult<YoshopOrderRefundEntity> queryRefundOrder(Integer state, Integer page, Integer userId);

    /**
     * 查询售后订单详情
     * @param userId
     * @param orderRefundId
     * @return
     */
    YoshopOrderRefundEntity queryRefundOrderDetail(Integer userId, Integer orderRefundId);

    /**
     * 查询售后订单详情
     * @param orderRefundId
     * @return
     */
    YoshopOrderRefundEntity queryRefundOrderDetail(Integer orderRefundId);

    /**
     * 审核售后订单
     * @param param
     */
    void auditOrderRefund(OrderRefundParamsDto param);

    /**
     * 申请售后订单
     * @param param
     * @param userId
     */
    void applyRefundOrderGoods(GoodsRefundParamsDto param, Integer userId);

    /**
     * 提交用户发货信息
     * @param param
     * @param userId
     */
    void refundOrderDelivery(OrderRefundParamsDto param, Integer userId);

    /**
     * 查询售后订单商品详情
     * @param orderGoodsId 订单商品id
     * @return
     */
    YoshopOrderRefundEntity getRefund(Integer orderId, Integer orderGoodsId);
}

